package com.gjzhao.fmmall.service.feign.fallback;

import com.gjzhao.fmmall.entity.Users;
import com.gjzhao.fmmall.service.feign.UserCheckClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
 * @Description: 查询用户服务降级类
 * @Author: gjzhao
 * @Date Created in 2022-02-12 11:35 下午
 */
@Component
public class UserCheckClientFallback implements UserCheckClient {


    private Logger logger = LoggerFactory.getLogger(getClass());

    //如果调用user-check服务失败，返回一个空对象
    @Override
    public Users checkUser(String username) {
        logger.info("------调用user-check服务失败，进入降级服务-----");
        return new Users();
    }
}
